package com.xiaomazi.acl.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xiaomazi.acl.entity.UserRole;
import com.xiaomazi.acl.mapper.UserRoleMapper;
import com.xiaomazi.acl.service.UserRoleService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: llxy-parent
 * @description: 用户角色中间业务表
 * @author: 小马子
 * @create: 2023-03-31 20:57
 **/
@Service
public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> implements UserRoleService {
    /**
     * 根据用户名查询用户角色信息
     * @param userId userId
     * @return List
     */
    @Override
    public List<UserRole> selectByUserId(String userId) {
        return this.query().eq("user_id", userId).list();
    }
}
